import USART
import time
import cv2
import struct
import all_socket
import pickle
import threading
#import GPS_SEND
import camera
import car_send
# 请根据实际情况修改串口号
sender = USART.SerialSender("/dev/ttyS4", 115200)
print("/dev/ttyS4;115200")
received_array=[1,1,1,1,1,1]

all_socket.message_socket1()
all_socket.camera_socket2()


def GPS_datasend():
  GPS_SEND.GPS_datasend()


def sendcamera():
  camera.camera_send()


def recieve_car_message():
  car_send.send_car_data()


if __name__ == '__main__':
  #recieve_car_message()
  recv_data_thread = threading.Thread(target=recieve_car_message)
  send_gps_thread = threading.Thread(target=GPS_datasend)
  send_cemera_thread = threading.Thread(target=sendcamera)
  recv_data_thread.start()
  send_cemera_thread.start()
  send_gps_thread.start()
